package cc.lucien.controller;

import cc.lucien.entity.BarVO;
import cc.lucien.entity.PieVO;
import cc.lucien.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/data")
public class DataController {

    @Autowired
    private DataService dataService;

    @RequestMapping("/barVO")
    @ResponseBody
    public BarVO getBarVo() {
        return dataService.getBarVO();
    }

    @RequestMapping("/pieVO")
    @ResponseBody
    public List<PieVO> getPieVo() {
        return dataService.getPieVO();
    }
}
